using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VWAVERSV
    {
        public DataRow Convert2WAVERSV(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryWAVERSV(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["WAVMANDANT"] = " ".PadRight(2 ); 
         dwReturn["WAVKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["WAVWERK"] = " ".PadRight(3 ); 
         dwReturn["WAVABT"] = " ".PadRight(3 ); 
         dwReturn["WAVWAKZ"] = " ".PadRight(1 ); 
         dwReturn["WAVART"] = " ".PadRight(20 ); 
         dwReturn["WAVVAR"] = " ".PadRight(2 ); 
         dwReturn["WAVPROGRP"] = " ".PadRight(3 ); 
         dwReturn["WAVARTGRP"] = " ".PadRight(3 ); 
         dwReturn["WAVADRSL"] = " ".PadRight(8 ); 
         dwReturn["WAVSSTKLG"] = " ".PadRight(0 ); 
         dwReturn["WAVSSTKLGV"] = " ".PadRight(0 ); 
         dwReturn["WAVSSTKLGB"] = " ".PadRight(0 ); 
         dwReturn["WAVSSTKGEW"] = " ".PadRight(0 ); 
         dwReturn["WAVSSTKGEWV"] = " ".PadRight(0 ); 
         dwReturn["WAVSSTKGEWB"] = " ".PadRight(0 ); 
         dwReturn["WAVSSTKBRT"] = " ".PadRight(0 ); 
         dwReturn["WAVSSTKBRTV"] = " ".PadRight(0 ); 
         dwReturn["WAVSSTKBRTB"] = " ".PadRight(0 ); 
         dwReturn["WAVAUFMSL"] = " ".PadRight(2 ); 
         dwReturn["WAVBAHNEN"] = " ".PadRight(0 ); 
         dwReturn["WAVTEILKZ"] = " ".PadRight(1 ); 
         dwReturn["WAVPACKTYP"] = " ".PadRight(4 ); 
         dwReturn["WAVWOBST"] = " ".PadRight(1 ); 
         dwReturn["WAVNRVERG"] = " ".PadRight(1 ); 
         dwReturn["WAVSTKNRKRS"] = " ".PadRight(2 ); 
         dwReturn["WAVSUFFART"] = " ".PadRight(1 ); 
         dwReturn["WAVTRENNZ"] = " ".PadRight(1 ); 
         dwReturn["WAVLAENGEU"] = " ".PadRight(1 ); 
         dwReturn["WAVLAENGES"] = " ".PadRight(1 ); 
         dwReturn["WAVFUELLZ"] = " ".PadRight(1 ); 
         dwReturn["WAVETITYP"] = " ".PadRight(2 ); 
         dwReturn["WAVKDETKZ"] = " ".PadRight(1 ); 
         dwReturn["WAVDOPPEL"] = " ".PadRight(10 ); 
         dwReturn["WAVVATYP"] = " ".PadRight(2 ); 
         dwReturn["WAVANZORG"] = " ".PadRight(0 ); 
         dwReturn["WAVANZKOP"] = " ".PadRight(0 ); 
         dwReturn["WAVVERSART"] = " ".PadRight(3 ); 
         dwReturn["WAVSPED"] = " ".PadRight(3 ); 
         dwReturn["WAVLIEFKOMP"] = " ".PadRight(1 ); 
         dwReturn["WAVVAKZ"] = " ".PadRight(1 ); 
         dwReturn["WAVLOAN"] = " ".PadRight(2 ); 
         dwReturn["WAVEKZAN"] = " ".PadRight(1 ); 
         dwReturn["WAVLBAN"] = " ".PadRight(2 ); 
         dwReturn["WAVLPAN"] = " ".PadRight(8 ); 
         dwReturn["WAVAUFBKZAN"] = " ".PadRight(1 ); 
         dwReturn["WAVTPMA"] = " ".PadRight(4 ); 
         dwReturn["WAVBEM1"] = " ".PadRight(60 ); 
         dwReturn["WAVBEM2"] = " ".PadRight(60 ); 
         dwReturn["WAVDIRVZS"] = " ".PadRight(2 ); 
         dwReturn["WAVDIRVEF"] = " ".PadRight(0 ); 
         dwReturn["WAVDIRVSF"] = " ".PadRight(0 ); 
         dwReturn["WAVDIRVMG"] = " ".PadRight(0 ); 
         dwReturn["WAVDIRVME"] = " ".PadRight(1 ); 
         dwReturn["WAVWEF16"] = " ".PadRight(1 ); 
         dwReturn["WAVWSF16"] = " ".PadRight(1 ); 
         dwReturn["WAVVEF16"] = " ".PadRight(1 ); 
         dwReturn["WAVVSF16"] = " ".PadRight(1 ); 
         dwReturn["WAVWEF18"] = " ".PadRight(1 ); 
         dwReturn["WAVWSF18"] = " ".PadRight(1 ); 
         dwReturn["WAVVEF18"] = " ".PadRight(1 ); 
         dwReturn["WAVVSF18"] = " ".PadRight(1 ); 
         dwReturn["WAVKOORD"] = " ".PadRight(1 ); 
         dwReturn["WAVLG"] = " ".PadRight(1 ); 
         dwReturn["WAVSCHUMF1"] = " ".PadRight(1 ); 
         dwReturn["WAVSCHUMF2"] = " ".PadRight(1 ); 
         dwReturn["WAVMENGE"] = " ".PadRight(0 ); 
         dwReturn["WAVME"] = " ".PadRight(1 ); 
         dwReturn["WAVEZS1"] = " ".PadRight(2 ); 
         dwReturn["WAVEEF1"] = " ".PadRight(0 ); 
         dwReturn["WAVESF1"] = " ".PadRight(0 ); 
         dwReturn["WAVEZS2"] = " ".PadRight(2 ); 
         dwReturn["WAVEEF2"] = " ".PadRight(0 ); 
         dwReturn["WAVESF2"] = " ".PadRight(0 ); 
         dwReturn["WAVEZS3"] = " ".PadRight(2 ); 
         dwReturn["WAVEEF3"] = " ".PadRight(0 ); 
         dwReturn["WAVESF3"] = " ".PadRight(0 ); 
         dwReturn["WAVEZS4"] = " ".PadRight(2 ); 
         dwReturn["WAVEEF4"] = " ".PadRight(0 ); 
         dwReturn["WAVESF4"] = " ".PadRight(0 ); 
         dwReturn["WAVEZS5"] = " ".PadRight(2 ); 
         dwReturn["WAVEEF5"] = " ".PadRight(0 ); 
         dwReturn["WAVESF5"] = " ".PadRight(0 ); 
         dwReturn["WAVDOMI1"] = " ".PadRight(1 ); 
         dwReturn["WAVDOMI2"] = " ".PadRight(1 ); 
         dwReturn["WAVDOMI3"] = " ".PadRight(1 ); 
         dwReturn["WAVDOMI4"] = " ".PadRight(1 ); 
         dwReturn["WAVKZS1"] = " ".PadRight(2 ); 
         dwReturn["WAVKKZAP1"] = " ".PadRight(1 ); 
         dwReturn["WAVKMENGE1"] = " ".PadRight(0 ); 
         dwReturn["WAVKZS2"] = " ".PadRight(2 ); 
         dwReturn["WAVKKZAP2"] = " ".PadRight(1 ); 
         dwReturn["WAVKMENGE2"] = " ".PadRight(0 ); 
         dwReturn["WAVKZS3"] = " ".PadRight(2 ); 
         dwReturn["WAVKKZAP3"] = " ".PadRight(1 ); 
         dwReturn["WAVKMENGE3"] = " ".PadRight(0 ); 
         dwReturn["WAVKZS4"] = " ".PadRight(2 ); 
         dwReturn["WAVKKZAP4"] = " ".PadRight(1 ); 
         dwReturn["WAVKMENGE4"] = " ".PadRight(0 ); 
         dwReturn["WAVKZS5"] = " ".PadRight(2 ); 
         dwReturn["WAVKKZAP5"] = " ".PadRight(1 ); 
         dwReturn["WAVKMENGE5"] = " ".PadRight(0 ); 
         dwReturn["WAVFSA"] = " ".PadRight(4 ); 
         dwReturn["WAVMAART"] = " ".PadRight(1 ); 
         dwReturn["WAVZSRUECK"] = " ".PadRight(1 ); 
         dwReturn["WAVRESETIK"] = " ".PadRight(1 ); 
         dwReturn["WAVDRSSTKNR"] = " ".PadRight(1 ); 
         dwReturn["WAVASSCHNIT"] = " ".PadRight(1 ); 
         dwReturn["WAVKUTLSTK"] = " ".PadRight(3 ); 
         dwReturn["WAVAUTOZS"] = " ".PadRight(1 ); 
         dwReturn["WAVANZRESTK"] = " ".PadRight(1 ); 
         dwReturn["WAVSCHRITW"] = " ".PadRight(2 ); 
         dwReturn["WAVLOA2"] = " ".PadRight(2 ); 
         dwReturn["WAVEKZA2"] = " ".PadRight(1 ); 
         dwReturn["WAVLBA2"] = " ".PadRight(2 ); 
         dwReturn["WAVLPA2"] = " ".PadRight(8 ); 
         dwReturn["WAVABKZA2"] = " ".PadRight(1 ); 
         dwReturn["WAVPKL"] = " ".PadRight(2 ); 
         dwReturn["WAVDOMF"] = " ".PadRight(1 ); 
         dwReturn["WAVZUSAM"] = " ".PadRight(2 ); 
         dwReturn["WAVANZLAB"] = " ".PadRight(1 ); 
         dwReturn["WAVARTLAB"] = " ".PadRight(2 ); 
         dwReturn["WAVZONERF"] = " ".PadRight(1 ); 
         dwReturn["WAVFILLER"] = " ".PadRight(60 ); 
         dwReturn["WAVAENDZL"] = " ".PadRight(0 ); 
         dwReturn["WAVAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["WAVAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["WAVNEUBEN"] = " ".PadRight(8 ); 
         dwReturn["WAVNEUDAT"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapWAVERSV(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveWAVERSV(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryWAVERSV(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapWAVERSV(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertWAVERSV(dwLocal, ITXDBVERSION);
            }
            UpdateWAVERSV(dwLocal);
        }
        public void InsertWAVERSV(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO WAVERSV(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryWAVERSV(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM WAVERSV WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM WAVERSV  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "WAVERSV";
            Return = Result;
            return Return;
        }
        public void DeleteWAVERSV(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM WAVERSV   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateWAVERSV(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE WAVERSV SET "
                    +"WAVMANDANT= :WAVMANDANT,"
                    +"WAVKUNDNR= :WAVKUNDNR,"
                    +"WAVWERK= :WAVWERK,"
                    +"WAVABT= :WAVABT,"
                    +"WAVWAKZ= :WAVWAKZ,"
                    +"WAVART= :WAVART,"
                    +"WAVVAR= :WAVVAR,"
                    +"WAVPROGRP= :WAVPROGRP,"
                    +"WAVARTGRP= :WAVARTGRP,"
                    +"WAVADRSL= :WAVADRSL,"
                    +"WAVSSTKLG= :WAVSSTKLG,"
                    +"WAVSSTKLGV= :WAVSSTKLGV,"
                    +"WAVSSTKLGB= :WAVSSTKLGB,"
                    +"WAVSSTKGEW= :WAVSSTKGEW,"
                    +"WAVSSTKGEWV= :WAVSSTKGEWV,"
                    +"WAVSSTKGEWB= :WAVSSTKGEWB,"
                    +"WAVSSTKBRT= :WAVSSTKBRT,"
                    +"WAVSSTKBRTV= :WAVSSTKBRTV,"
                    +"WAVSSTKBRTB= :WAVSSTKBRTB,"
                    +"WAVAUFMSL= :WAVAUFMSL,"
                    +"WAVBAHNEN= :WAVBAHNEN,"
                    +"WAVTEILKZ= :WAVTEILKZ,"
                    +"WAVPACKTYP= :WAVPACKTYP,"
                    +"WAVWOBST= :WAVWOBST,"
                    +"WAVNRVERG= :WAVNRVERG,"
                    +"WAVSTKNRKRS= :WAVSTKNRKRS,"
                    +"WAVSUFFART= :WAVSUFFART,"
                    +"WAVTRENNZ= :WAVTRENNZ,"
                    +"WAVLAENGEU= :WAVLAENGEU,"
                    +"WAVLAENGES= :WAVLAENGES,"
                    +"WAVFUELLZ= :WAVFUELLZ,"
                    +"WAVETITYP= :WAVETITYP,"
                    +"WAVKDETKZ= :WAVKDETKZ,"
                    +"WAVDOPPEL= :WAVDOPPEL,"
                    +"WAVVATYP= :WAVVATYP,"
                    +"WAVANZORG= :WAVANZORG,"
                    +"WAVANZKOP= :WAVANZKOP,"
                    +"WAVVERSART= :WAVVERSART,"
                    +"WAVSPED= :WAVSPED,"
                    +"WAVLIEFKOMP= :WAVLIEFKOMP,"
                    +"WAVVAKZ= :WAVVAKZ,"
                    +"WAVLOAN= :WAVLOAN,"
                    +"WAVEKZAN= :WAVEKZAN,"
                    +"WAVLBAN= :WAVLBAN,"
                    +"WAVLPAN= :WAVLPAN,"
                    +"WAVAUFBKZAN= :WAVAUFBKZAN,"
                    +"WAVTPMA= :WAVTPMA,"
                    +"WAVBEM1= :WAVBEM1,"
                    +"WAVBEM2= :WAVBEM2,"
                    +"WAVDIRVZS= :WAVDIRVZS,"
                    +"WAVDIRVEF= :WAVDIRVEF,"
                    +"WAVDIRVSF= :WAVDIRVSF,"
                    +"WAVDIRVMG= :WAVDIRVMG,"
                    +"WAVDIRVME= :WAVDIRVME,"
                    +"WAVWEF16= :WAVWEF16,"
                    +"WAVWSF16= :WAVWSF16,"
                    +"WAVVEF16= :WAVVEF16,"
                    +"WAVVSF16= :WAVVSF16,"
                    +"WAVWEF18= :WAVWEF18,"
                    +"WAVWSF18= :WAVWSF18,"
                    +"WAVVEF18= :WAVVEF18,"
                    +"WAVVSF18= :WAVVSF18,"
                    +"WAVKOORD= :WAVKOORD,"
                    +"WAVLG= :WAVLG,"
                    +"WAVSCHUMF1= :WAVSCHUMF1,"
                    +"WAVSCHUMF2= :WAVSCHUMF2,"
                    +"WAVMENGE= :WAVMENGE,"
                    +"WAVME= :WAVME,"
                    +"WAVEZS1= :WAVEZS1,"
                    +"WAVEEF1= :WAVEEF1,"
                    +"WAVESF1= :WAVESF1,"
                    +"WAVEZS2= :WAVEZS2,"
                    +"WAVEEF2= :WAVEEF2,"
                    +"WAVESF2= :WAVESF2,"
                    +"WAVEZS3= :WAVEZS3,"
                    +"WAVEEF3= :WAVEEF3,"
                    +"WAVESF3= :WAVESF3,"
                    +"WAVEZS4= :WAVEZS4,"
                    +"WAVEEF4= :WAVEEF4,"
                    +"WAVESF4= :WAVESF4,"
                    +"WAVEZS5= :WAVEZS5,"
                    +"WAVEEF5= :WAVEEF5,"
                    +"WAVESF5= :WAVESF5,"
                    +"WAVDOMI1= :WAVDOMI1,"
                    +"WAVDOMI2= :WAVDOMI2,"
                    +"WAVDOMI3= :WAVDOMI3,"
                    +"WAVDOMI4= :WAVDOMI4,"
                    +"WAVKZS1= :WAVKZS1,"
                    +"WAVKKZAP1= :WAVKKZAP1,"
                    +"WAVKMENGE1= :WAVKMENGE1,"
                    +"WAVKZS2= :WAVKZS2,"
                    +"WAVKKZAP2= :WAVKKZAP2,"
                    +"WAVKMENGE2= :WAVKMENGE2,"
                    +"WAVKZS3= :WAVKZS3,"
                    +"WAVKKZAP3= :WAVKKZAP3,"
                    +"WAVKMENGE3= :WAVKMENGE3,"
                    +"WAVKZS4= :WAVKZS4,"
                    +"WAVKKZAP4= :WAVKKZAP4,"
                    +"WAVKMENGE4= :WAVKMENGE4,"
                    +"WAVKZS5= :WAVKZS5,"
                    +"WAVKKZAP5= :WAVKKZAP5,"
                    +"WAVKMENGE5= :WAVKMENGE5,"
                    +"WAVFSA= :WAVFSA,"
                    +"WAVMAART= :WAVMAART,"
                    +"WAVZSRUECK= :WAVZSRUECK,"
                    +"WAVRESETIK= :WAVRESETIK,"
                    +"WAVDRSSTKNR= :WAVDRSSTKNR,"
                    +"WAVASSCHNIT= :WAVASSCHNIT,"
                    +"WAVKUTLSTK= :WAVKUTLSTK,"
                    +"WAVAUTOZS= :WAVAUTOZS,"
                    +"WAVANZRESTK= :WAVANZRESTK,"
                    +"WAVSCHRITW= :WAVSCHRITW,"
                    +"WAVLOA2= :WAVLOA2,"
                    +"WAVEKZA2= :WAVEKZA2,"
                    +"WAVLBA2= :WAVLBA2,"
                    +"WAVLPA2= :WAVLPA2,"
                    +"WAVABKZA2= :WAVABKZA2,"
                    +"WAVPKL= :WAVPKL,"
                    +"WAVDOMF= :WAVDOMF,"
                    +"WAVZUSAM= :WAVZUSAM,"
                    +"WAVANZLAB= :WAVANZLAB,"
                    +"WAVARTLAB= :WAVARTLAB,"
                    +"WAVZONERF= :WAVZONERF,"
                    +"WAVFILLER= :WAVFILLER,"
                    +"WAVAENDZL= :WAVAENDZL,"
                    +"WAVAENDBEN= :WAVAENDBEN,"
                    +"WAVAENDDAT= :WAVAENDDAT,"
                    +"WAVNEUBEN= :WAVNEUBEN,"
                    +"WAVNEUDAT= :WAVNEUDAT,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("WAVMANDANT", OracleType.NVarChar).Value = dwData["WAVMANDANT"].ToString(); 
          or1.Parameters.Add("WAVKUNDNR", OracleType.NVarChar).Value = dwData["WAVKUNDNR"].ToString(); 
          or1.Parameters.Add("WAVWERK", OracleType.NVarChar).Value = dwData["WAVWERK"].ToString(); 
          or1.Parameters.Add("WAVABT", OracleType.NVarChar).Value = dwData["WAVABT"].ToString(); 
          or1.Parameters.Add("WAVWAKZ", OracleType.NVarChar).Value = dwData["WAVWAKZ"].ToString(); 
          or1.Parameters.Add("WAVART", OracleType.NVarChar).Value = dwData["WAVART"].ToString(); 
          or1.Parameters.Add("WAVVAR", OracleType.NVarChar).Value = dwData["WAVVAR"].ToString(); 
          or1.Parameters.Add("WAVPROGRP", OracleType.NVarChar).Value = dwData["WAVPROGRP"].ToString(); 
          or1.Parameters.Add("WAVARTGRP", OracleType.NVarChar).Value = dwData["WAVARTGRP"].ToString(); 
          or1.Parameters.Add("WAVADRSL", OracleType.NVarChar).Value = dwData["WAVADRSL"].ToString(); 
          or1.Parameters.Add("WAVSSTKLG", OracleType.NVarChar).Value = dwData["WAVSSTKLG"].ToString(); 
          or1.Parameters.Add("WAVSSTKLGV", OracleType.NVarChar).Value = dwData["WAVSSTKLGV"].ToString(); 
          or1.Parameters.Add("WAVSSTKLGB", OracleType.NVarChar).Value = dwData["WAVSSTKLGB"].ToString(); 
          or1.Parameters.Add("WAVSSTKGEW", OracleType.NVarChar).Value = dwData["WAVSSTKGEW"].ToString(); 
          or1.Parameters.Add("WAVSSTKGEWV", OracleType.NVarChar).Value = dwData["WAVSSTKGEWV"].ToString(); 
          or1.Parameters.Add("WAVSSTKGEWB", OracleType.NVarChar).Value = dwData["WAVSSTKGEWB"].ToString(); 
          or1.Parameters.Add("WAVSSTKBRT", OracleType.NVarChar).Value = dwData["WAVSSTKBRT"].ToString(); 
          or1.Parameters.Add("WAVSSTKBRTV", OracleType.NVarChar).Value = dwData["WAVSSTKBRTV"].ToString(); 
          or1.Parameters.Add("WAVSSTKBRTB", OracleType.NVarChar).Value = dwData["WAVSSTKBRTB"].ToString(); 
          or1.Parameters.Add("WAVAUFMSL", OracleType.NVarChar).Value = dwData["WAVAUFMSL"].ToString(); 
          or1.Parameters.Add("WAVBAHNEN", OracleType.NVarChar).Value = dwData["WAVBAHNEN"].ToString(); 
          or1.Parameters.Add("WAVTEILKZ", OracleType.NVarChar).Value = dwData["WAVTEILKZ"].ToString(); 
          or1.Parameters.Add("WAVPACKTYP", OracleType.NVarChar).Value = dwData["WAVPACKTYP"].ToString(); 
          or1.Parameters.Add("WAVWOBST", OracleType.NVarChar).Value = dwData["WAVWOBST"].ToString(); 
          or1.Parameters.Add("WAVNRVERG", OracleType.NVarChar).Value = dwData["WAVNRVERG"].ToString(); 
          or1.Parameters.Add("WAVSTKNRKRS", OracleType.NVarChar).Value = dwData["WAVSTKNRKRS"].ToString(); 
          or1.Parameters.Add("WAVSUFFART", OracleType.NVarChar).Value = dwData["WAVSUFFART"].ToString(); 
          or1.Parameters.Add("WAVTRENNZ", OracleType.NVarChar).Value = dwData["WAVTRENNZ"].ToString(); 
          or1.Parameters.Add("WAVLAENGEU", OracleType.NVarChar).Value = dwData["WAVLAENGEU"].ToString(); 
          or1.Parameters.Add("WAVLAENGES", OracleType.NVarChar).Value = dwData["WAVLAENGES"].ToString(); 
          or1.Parameters.Add("WAVFUELLZ", OracleType.NVarChar).Value = dwData["WAVFUELLZ"].ToString(); 
          or1.Parameters.Add("WAVETITYP", OracleType.NVarChar).Value = dwData["WAVETITYP"].ToString(); 
          or1.Parameters.Add("WAVKDETKZ", OracleType.NVarChar).Value = dwData["WAVKDETKZ"].ToString(); 
          or1.Parameters.Add("WAVDOPPEL", OracleType.NVarChar).Value = dwData["WAVDOPPEL"].ToString(); 
          or1.Parameters.Add("WAVVATYP", OracleType.NVarChar).Value = dwData["WAVVATYP"].ToString(); 
          or1.Parameters.Add("WAVANZORG", OracleType.NVarChar).Value = dwData["WAVANZORG"].ToString(); 
          or1.Parameters.Add("WAVANZKOP", OracleType.NVarChar).Value = dwData["WAVANZKOP"].ToString(); 
          or1.Parameters.Add("WAVVERSART", OracleType.NVarChar).Value = dwData["WAVVERSART"].ToString(); 
          or1.Parameters.Add("WAVSPED", OracleType.NVarChar).Value = dwData["WAVSPED"].ToString(); 
          or1.Parameters.Add("WAVLIEFKOMP", OracleType.NVarChar).Value = dwData["WAVLIEFKOMP"].ToString(); 
          or1.Parameters.Add("WAVVAKZ", OracleType.NVarChar).Value = dwData["WAVVAKZ"].ToString(); 
          or1.Parameters.Add("WAVLOAN", OracleType.NVarChar).Value = dwData["WAVLOAN"].ToString(); 
          or1.Parameters.Add("WAVEKZAN", OracleType.NVarChar).Value = dwData["WAVEKZAN"].ToString(); 
          or1.Parameters.Add("WAVLBAN", OracleType.NVarChar).Value = dwData["WAVLBAN"].ToString(); 
          or1.Parameters.Add("WAVLPAN", OracleType.NVarChar).Value = dwData["WAVLPAN"].ToString(); 
          or1.Parameters.Add("WAVAUFBKZAN", OracleType.NVarChar).Value = dwData["WAVAUFBKZAN"].ToString(); 
          or1.Parameters.Add("WAVTPMA", OracleType.NVarChar).Value = dwData["WAVTPMA"].ToString(); 
          or1.Parameters.Add("WAVBEM1", OracleType.NVarChar).Value = dwData["WAVBEM1"].ToString(); 
          or1.Parameters.Add("WAVBEM2", OracleType.NVarChar).Value = dwData["WAVBEM2"].ToString(); 
          or1.Parameters.Add("WAVDIRVZS", OracleType.NVarChar).Value = dwData["WAVDIRVZS"].ToString(); 
          or1.Parameters.Add("WAVDIRVEF", OracleType.NVarChar).Value = dwData["WAVDIRVEF"].ToString(); 
          or1.Parameters.Add("WAVDIRVSF", OracleType.NVarChar).Value = dwData["WAVDIRVSF"].ToString(); 
          or1.Parameters.Add("WAVDIRVMG", OracleType.NVarChar).Value = dwData["WAVDIRVMG"].ToString(); 
          or1.Parameters.Add("WAVDIRVME", OracleType.NVarChar).Value = dwData["WAVDIRVME"].ToString(); 
          or1.Parameters.Add("WAVWEF16", OracleType.NVarChar).Value = dwData["WAVWEF16"].ToString(); 
          or1.Parameters.Add("WAVWSF16", OracleType.NVarChar).Value = dwData["WAVWSF16"].ToString(); 
          or1.Parameters.Add("WAVVEF16", OracleType.NVarChar).Value = dwData["WAVVEF16"].ToString(); 
          or1.Parameters.Add("WAVVSF16", OracleType.NVarChar).Value = dwData["WAVVSF16"].ToString(); 
          or1.Parameters.Add("WAVWEF18", OracleType.NVarChar).Value = dwData["WAVWEF18"].ToString(); 
          or1.Parameters.Add("WAVWSF18", OracleType.NVarChar).Value = dwData["WAVWSF18"].ToString(); 
          or1.Parameters.Add("WAVVEF18", OracleType.NVarChar).Value = dwData["WAVVEF18"].ToString(); 
          or1.Parameters.Add("WAVVSF18", OracleType.NVarChar).Value = dwData["WAVVSF18"].ToString(); 
          or1.Parameters.Add("WAVKOORD", OracleType.NVarChar).Value = dwData["WAVKOORD"].ToString(); 
          or1.Parameters.Add("WAVLG", OracleType.NVarChar).Value = dwData["WAVLG"].ToString(); 
          or1.Parameters.Add("WAVSCHUMF1", OracleType.NVarChar).Value = dwData["WAVSCHUMF1"].ToString(); 
          or1.Parameters.Add("WAVSCHUMF2", OracleType.NVarChar).Value = dwData["WAVSCHUMF2"].ToString(); 
          or1.Parameters.Add("WAVMENGE", OracleType.NVarChar).Value = dwData["WAVMENGE"].ToString(); 
          or1.Parameters.Add("WAVME", OracleType.NVarChar).Value = dwData["WAVME"].ToString(); 
          or1.Parameters.Add("WAVEZS1", OracleType.NVarChar).Value = dwData["WAVEZS1"].ToString(); 
          or1.Parameters.Add("WAVEEF1", OracleType.NVarChar).Value = dwData["WAVEEF1"].ToString(); 
          or1.Parameters.Add("WAVESF1", OracleType.NVarChar).Value = dwData["WAVESF1"].ToString(); 
          or1.Parameters.Add("WAVEZS2", OracleType.NVarChar).Value = dwData["WAVEZS2"].ToString(); 
          or1.Parameters.Add("WAVEEF2", OracleType.NVarChar).Value = dwData["WAVEEF2"].ToString(); 
          or1.Parameters.Add("WAVESF2", OracleType.NVarChar).Value = dwData["WAVESF2"].ToString(); 
          or1.Parameters.Add("WAVEZS3", OracleType.NVarChar).Value = dwData["WAVEZS3"].ToString(); 
          or1.Parameters.Add("WAVEEF3", OracleType.NVarChar).Value = dwData["WAVEEF3"].ToString(); 
          or1.Parameters.Add("WAVESF3", OracleType.NVarChar).Value = dwData["WAVESF3"].ToString(); 
          or1.Parameters.Add("WAVEZS4", OracleType.NVarChar).Value = dwData["WAVEZS4"].ToString(); 
          or1.Parameters.Add("WAVEEF4", OracleType.NVarChar).Value = dwData["WAVEEF4"].ToString(); 
          or1.Parameters.Add("WAVESF4", OracleType.NVarChar).Value = dwData["WAVESF4"].ToString(); 
          or1.Parameters.Add("WAVEZS5", OracleType.NVarChar).Value = dwData["WAVEZS5"].ToString(); 
          or1.Parameters.Add("WAVEEF5", OracleType.NVarChar).Value = dwData["WAVEEF5"].ToString(); 
          or1.Parameters.Add("WAVESF5", OracleType.NVarChar).Value = dwData["WAVESF5"].ToString(); 
          or1.Parameters.Add("WAVDOMI1", OracleType.NVarChar).Value = dwData["WAVDOMI1"].ToString(); 
          or1.Parameters.Add("WAVDOMI2", OracleType.NVarChar).Value = dwData["WAVDOMI2"].ToString(); 
          or1.Parameters.Add("WAVDOMI3", OracleType.NVarChar).Value = dwData["WAVDOMI3"].ToString(); 
          or1.Parameters.Add("WAVDOMI4", OracleType.NVarChar).Value = dwData["WAVDOMI4"].ToString(); 
          or1.Parameters.Add("WAVKZS1", OracleType.NVarChar).Value = dwData["WAVKZS1"].ToString(); 
          or1.Parameters.Add("WAVKKZAP1", OracleType.NVarChar).Value = dwData["WAVKKZAP1"].ToString(); 
          or1.Parameters.Add("WAVKMENGE1", OracleType.NVarChar).Value = dwData["WAVKMENGE1"].ToString(); 
          or1.Parameters.Add("WAVKZS2", OracleType.NVarChar).Value = dwData["WAVKZS2"].ToString(); 
          or1.Parameters.Add("WAVKKZAP2", OracleType.NVarChar).Value = dwData["WAVKKZAP2"].ToString(); 
          or1.Parameters.Add("WAVKMENGE2", OracleType.NVarChar).Value = dwData["WAVKMENGE2"].ToString(); 
          or1.Parameters.Add("WAVKZS3", OracleType.NVarChar).Value = dwData["WAVKZS3"].ToString(); 
          or1.Parameters.Add("WAVKKZAP3", OracleType.NVarChar).Value = dwData["WAVKKZAP3"].ToString(); 
          or1.Parameters.Add("WAVKMENGE3", OracleType.NVarChar).Value = dwData["WAVKMENGE3"].ToString(); 
          or1.Parameters.Add("WAVKZS4", OracleType.NVarChar).Value = dwData["WAVKZS4"].ToString(); 
          or1.Parameters.Add("WAVKKZAP4", OracleType.NVarChar).Value = dwData["WAVKKZAP4"].ToString(); 
          or1.Parameters.Add("WAVKMENGE4", OracleType.NVarChar).Value = dwData["WAVKMENGE4"].ToString(); 
          or1.Parameters.Add("WAVKZS5", OracleType.NVarChar).Value = dwData["WAVKZS5"].ToString(); 
          or1.Parameters.Add("WAVKKZAP5", OracleType.NVarChar).Value = dwData["WAVKKZAP5"].ToString(); 
          or1.Parameters.Add("WAVKMENGE5", OracleType.NVarChar).Value = dwData["WAVKMENGE5"].ToString(); 
          or1.Parameters.Add("WAVFSA", OracleType.NVarChar).Value = dwData["WAVFSA"].ToString(); 
          or1.Parameters.Add("WAVMAART", OracleType.NVarChar).Value = dwData["WAVMAART"].ToString(); 
          or1.Parameters.Add("WAVZSRUECK", OracleType.NVarChar).Value = dwData["WAVZSRUECK"].ToString(); 
          or1.Parameters.Add("WAVRESETIK", OracleType.NVarChar).Value = dwData["WAVRESETIK"].ToString(); 
          or1.Parameters.Add("WAVDRSSTKNR", OracleType.NVarChar).Value = dwData["WAVDRSSTKNR"].ToString(); 
          or1.Parameters.Add("WAVASSCHNIT", OracleType.NVarChar).Value = dwData["WAVASSCHNIT"].ToString(); 
          or1.Parameters.Add("WAVKUTLSTK", OracleType.NVarChar).Value = dwData["WAVKUTLSTK"].ToString(); 
          or1.Parameters.Add("WAVAUTOZS", OracleType.NVarChar).Value = dwData["WAVAUTOZS"].ToString(); 
          or1.Parameters.Add("WAVANZRESTK", OracleType.NVarChar).Value = dwData["WAVANZRESTK"].ToString(); 
          or1.Parameters.Add("WAVSCHRITW", OracleType.NVarChar).Value = dwData["WAVSCHRITW"].ToString(); 
          or1.Parameters.Add("WAVLOA2", OracleType.NVarChar).Value = dwData["WAVLOA2"].ToString(); 
          or1.Parameters.Add("WAVEKZA2", OracleType.NVarChar).Value = dwData["WAVEKZA2"].ToString(); 
          or1.Parameters.Add("WAVLBA2", OracleType.NVarChar).Value = dwData["WAVLBA2"].ToString(); 
          or1.Parameters.Add("WAVLPA2", OracleType.NVarChar).Value = dwData["WAVLPA2"].ToString(); 
          or1.Parameters.Add("WAVABKZA2", OracleType.NVarChar).Value = dwData["WAVABKZA2"].ToString(); 
          or1.Parameters.Add("WAVPKL", OracleType.NVarChar).Value = dwData["WAVPKL"].ToString(); 
          or1.Parameters.Add("WAVDOMF", OracleType.NVarChar).Value = dwData["WAVDOMF"].ToString(); 
          or1.Parameters.Add("WAVZUSAM", OracleType.NVarChar).Value = dwData["WAVZUSAM"].ToString(); 
          or1.Parameters.Add("WAVANZLAB", OracleType.NVarChar).Value = dwData["WAVANZLAB"].ToString(); 
          or1.Parameters.Add("WAVARTLAB", OracleType.NVarChar).Value = dwData["WAVARTLAB"].ToString(); 
          or1.Parameters.Add("WAVZONERF", OracleType.NVarChar).Value = dwData["WAVZONERF"].ToString(); 
          or1.Parameters.Add("WAVFILLER", OracleType.NVarChar).Value = dwData["WAVFILLER"].ToString(); 
          or1.Parameters.Add("WAVAENDZL", OracleType.NVarChar).Value = dwData["WAVAENDZL"].ToString(); 
          or1.Parameters.Add("WAVAENDBEN", OracleType.NVarChar).Value = dwData["WAVAENDBEN"].ToString(); 
          or1.Parameters.Add("WAVAENDDAT", OracleType.NVarChar).Value = dwData["WAVAENDDAT"].ToString(); 
          or1.Parameters.Add("WAVNEUBEN", OracleType.NVarChar).Value = dwData["WAVNEUBEN"].ToString(); 
          or1.Parameters.Add("WAVNEUDAT", OracleType.NVarChar).Value = dwData["WAVNEUDAT"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
